package cn.xie.wrench.ty.wrench.starter.design.framework.link.model2;

import cn.xie.wrench.ty.wrench.starter.design.framework.link.model2.chain.BusinessLinkedList;
import cn.xie.wrench.ty.wrench.starter.design.framework.link.model2.handler.ILogicHandler;

/**
 * @author: xiaoxie
 * create: 2025-05-14 14:33
 * @BelongsProject: ty-wrench
 * @BelongsPackage: cn.xie.wrench.ty.wrench.starter.design.framework.link.model2
 * description: 链路装配
 */
public class LinkArmory<T, D, R> {

    private final BusinessLinkedList<T, D, R> logicLink;

    @SafeVarargs
    public LinkArmory(String linkName, ILogicHandler<T, D, R>... logicHandlers) {
        logicLink = new BusinessLinkedList<>(linkName);
        for (ILogicHandler<T, D, R> logicHandler: logicHandlers){
            logicLink.add(logicHandler);
        }
    }

    public BusinessLinkedList<T, D, R> getLogicLink() {
        return logicLink;
    }

}

